package net.chrisrichardson.ec2deployer.core

class SnapshotProcessMonitor implements ProcessMonitor {

    Process process
    
    void monitorProcess(Process p) {
        this.process = p
        Thread.startDaemon {System.out << p.in}
        Thread.startDaemon {System.err << p.err}
    }

    def stop() {
        process.destroy()
    }

    public void noteCommand(String command) {
    }

    public boolean isWaitForOrKillRequired() {
        return false
    }

    public void noteEndedOrTimedOut(Process process) {
    }
}